<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>报表分析</title>
 <style type="text/css">  
    *{  
        margin: 0;  
        padding: 0;  
    }  
    html,body{  
        height: 100%;  
        width: 100%;  
    }  
    .test{  
        height: 100%;  
        width: 100%;  
        background: #EE6AA7;  
    }  
</style>  
</head>
<body>
	<div class="test">
		<div id="procurementMap" style="min-width:400px;height:100%;"></div>
	</div>
	<script src="<%=basePath %>/resource/js/jquery-1.11.0.js"/></script>
	<script src="<%=basePath %>/resource/highcharts/highcharts.js"/></script>
	<script type="text/javascript" src="<%=basePath %>/admin/enterpriseManagement/procurementManagement/procurementMap/procurement-map.js" ></script>
	<script type="text/javascript">
	$(function(){
		//加载每条拉每月生产情况
		$.ajax({
			   type: 'get',
			   url: "<%=basePath %>/chart/procurement",
			   dataType: "json",
			   contentType : "application/x-www-form-urlencoded;charset='UTF-8'",
			   success: function(msg){
				   Highcharts.chart('procurementMap',{
					   		credits: {
					   			text: '大旗科技有限公司',
					   			href: "javascript:void(0);"
					   		},
						    chart: {
						        type: 'line'
						    },
						    title: {
						        text: '采购次数'
						    },
						    subtitle: {
						        text: '数据来源: 大旗科技有限公司'
						    },
						    xAxis: {
						        categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
						    },
						    yAxis: {
						        title: {
						            text: '次数'
						        }
						    },
						    plotOptions: {
						        line: {
						            dataLabels: {
						                enabled: true          // 开启数据标签
						            },
						            enableMouseTracking: false // 关闭鼠标跟踪，对应的提示框、点击事件会失效
						        }
						    },
						    series:msg
					});
			   }
		});
	})
	</script>
</body>
</html>